<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
<body>
    <div>
      <ul>
        <li></li>
      </ul>
    </div>
  </body>
  <script>
    
    function ajax(method, url, callback) {
      var xhr = new XMLHttpRequest()
      xhr.open(method, url)
      xhr.onreadystatechange = function () {
        if (xhr.status == 200 && xhr.readyState == 4) {
          callback(JSON.parse(xhr.responseText))
        }
      }
      xhr.send()
    }
    ajax('get', './data.json', function (data) {
      document.querySelector('ul').innerHTML =  data.list.map((item)=>{
        return `<li>${item}</li>`
      }).join('')
    })
  </script>
  
  </html>
</body>

</html>